package org.luxor.commons.workflow.entity;

import javax.validation.constraints.NotBlank;

/**
 * 委托任务
 *
 * @author Mr.yan  @date 2021/10/27
 */
public class DelegateTask {

    /**
     * 任务ID
     */
    @NotBlank(message = "任务ID(taskId)，不能为空")
    private String taskId;

    /**
     * 办理人
     */
    @NotBlank(message = "办理人(userId)，不能为空")
    private String userId;

    /**
     * 目标任务受理人
     */
    @NotBlank(message = "受理人(assignee)，不能为空")
    private String assignee;

    /**
     * 委派理由
     */
    private String reason;

    public DelegateTask() {
    }

    public DelegateTask(String taskId, String userId, String assignee) {
        this();
        this.taskId = taskId;
        this.userId = userId;
        this.assignee = assignee;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public String toString() {
        return "DelegateTask{" +
                "taskId='" + taskId + '\'' +
                ", userId='" + userId + '\'' +
                ", assignee='" + assignee + '\'' +
                ", reason='" + reason + '\'' +
                '}';
    }
}
